﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pseudogenerator.Common.Generators.Core;

namespace Pseudogenerator.Common.Generators
{
    public class MultiplicativeCongruential
        :Congruential
    {
        public override bool CanGenerateNext
        {
            get
            {
                return a != 0 && m != 0;
            }
        }

        public override uint GetNextValue()
        {
            return (a * ActualValue) % m;
        }

        public override string ToString()
        {
            return string.Format("X₁ = ({0} ٠ {1}) mod {2}", a, x0, m);
        }
    }
}
